#include <stdio.h>

#define IN 1
#define OUT 0
void main(){
    int c, lc, wc, zc, status;

    status = OUT;

    lc = wc = zc = 0;

    while((c = getchar()) != EOF){
        ++zc;
        if(c == '\n'){
            ++lc;
        }

        if(c == ' ' || c == '\n' || c == '\t')
            status = OUT;

        if (status == OUT){
            status = IN;
            wc++;
        }
    }

    printf("%d %d %d\n", lc, wc, zc);
}